<?php
/**
 * Zend Framework (http://framework.zend.com/)
 *
 * @link      http://github.com/zendframework/Cache for the canonical source repository
 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd New BSD License
 */

namespace Cache\Controller;

use Zend\Mvc\Controller\AbstractActionController;
use Zend\Cache\StorageFactory;

class IndexController extends AbstractActionController
{
    public function indexAction()
    {
        $cache = StorageFactory::adapterFactory('filesystem', array(
            'no_atime' => false,
        ));
        
        $cache->getEventManager()->attach('capability', function($event){
        	echo count($event->getParams()) . ' capablities changed';
        });
        $cache->getOptions()->setNoATime(true);
        
        
        return array();
    }

    public function fooAction()
    {
        // This shows the :controller and :action parameters in default route
        // are working when you browse to /index/index/foo
        return array();
    }
}
